var mySwiper = new Swiper('.swiper', {
    direction: 'horizontal', // 垂直切换选项
    loop: true, // 循环模式选项
    effect: 'fade', // 设置Slide的切换效果，淡入
    fadeEffect: {
        crossFade: true,
    },

    autoplay: {
        delay: 4000,
        stopOnLastSlide: false,
        disableOnInteraction: false,
    }
});

var mySwiper2 = new Swiper('.swiperCase', {
    direction: 'horizontal', // 垂直切换选项
    loop: true, // 循环模式选项

    // 如果需要分页器
    pagination: {
        el: '.swiperCase-pagination',
    },

    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiperCase-button-next',
        prevEl: '.swiperCase-button-prev',
    },
})

let userPhone = document.querySelector('.userPhone');
let loginnn = document.querySelector('.loginnn');
let dialoggg = document.querySelector('.dialoggg');
let out = document.querySelector('.out');

loginnn.onclick = function () {

    location.href = '../html/login-dialog.html';
};
dialoggg.onclick = function () {

    location.href = '../html/login-dialog.html';
};

out.onclick = function () {

    setCookie('user', -1);
    location.reload();
};

let user = getCookie('user');
if(!user){
    loginnn.style.display = 'block';
    dialoggg.style.display = 'block';
    userPhone.style.display = 'none';
    out.style.display = 'none';
}else{
    loginnn.style.display = 'none';
    dialoggg.style.display = 'none';
    userPhone.style.display = 'block';
    out.style.display = 'block';
};